home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1986 April
/
Ahoy_Magazine_86-04_1986_Double_L.d64
/
pyramidal print
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
376b
|
13 lines
1 rem
2 rem problem #24-2 :
3 rem pyramidal printout
4 rem solution by
5 rem ron weiner
6 rem
10 open 4,3:input"output to screen or printer (s/p) s[157][157][157]";a$:if a$="s"goto 30
20 close 4 : open 4,4
30 input "enter any word which has same first and last letters";w$
40 print#4,spc(len(w$)-1)left$(w$,1)
50 fori=2 to len(w$)-1:print#4,spc(len(w$)-i)mid$(w$,i,1)spc(i*2-3)mid$(w$,i,1)
60 next:for i=1 to len(w$):print#4,mid$(w$,i,1)" ";:next:print#4:close4